﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace DAO
{
    public class Provider
    {
        public static string cnnString = @"Data Source=MYCHI-VAIO;Initial Catalog=QLDVe;Integrated Security=True";
        public static SqlConnection cnn = new SqlConnection(cnnString);
        /// <summary>
        /// Xử lý chuỗi kết nối
        /// </summary>
        /// <param name="connect"></param>
        /// <returns>cnn</returns>
        public static SqlConnection Getconnection(string connect)
        {
            try
            {
                cnn = new SqlConnection(connect);
            }
            catch (Exception e)
            {
                throw e;
            }
            return cnn;
        }
    }
}
